package site.jjqzplucky.common.result;

import lombok.Setter;

public enum ResultEnum implements IResult{
    SUCCESS(2001, "接口调用成功"),
    VALIDATE_FAILED(2002, "参数校验失败"),
    COMMON_FAILED(2003, "接口调用失败"),
    FORBIDDEN(2004, "没有权限访问资源"),
    USER_NOT_FOUND(2005, "账号密码错误或用户不存在")
    ;

    private final Integer code;
    private final String message;

    ResultEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }
    @Override
    public String getMessage() {
        return message;
    }

}
